﻿using SqlSugar;

namespace FrameWork.Data.Mapping
{
    [SugarTable("DeviceType")]
    public class DeviceType : ModelBase
    {
        private string _TypeName;
        /// <summary>
        /// 设备名称
        /// </summary>
        [SugarColumn(IsNullable = true, Length = 32, ColumnDescription = "设备类型名称")]
        public string TypeName
        {
            get { return _TypeName; }
            set { _TypeName = value; OnPropertyChanged(nameof(TypeName)); }
        }
        private string _TypeCode;
        /// <summary>
        /// 设备编码
        /// </summary>
        [SugarColumn(IsNullable = true, Length = 32, ColumnDescription = "设备类型编码")]
        public string TypeCode
        {
            get { return _TypeCode; }
            set { _TypeCode = value; OnPropertyChanged(nameof(TypeCode)); }
        }
        private int _Port;
        /// <summary>
        /// 设备名称
        /// </summary>
        [SugarColumn(IsNullable = true, ColumnDescription = "设备类型端口")]
        public int Port
        {
            get { return _Port; }
            set { _Port = value; OnPropertyChanged(nameof(Port)); }
        }
        private string _DeviceAdapter;
        /// <summary>
        /// 设备适配器
        /// </summary>
        [SugarColumn(IsNullable = true, Length = 32, ColumnDescription = "设备类型适配器名称")]
        public string DeviceAdapter
        {
            get { return _DeviceAdapter; }
            set { _DeviceAdapter = value; OnPropertyChanged(nameof(DeviceAdapter)); }
        }
        private int _ProductLine;
        /// <summary>
        /// 产品线(目前只分主产品(CDS)和外接设备)
        /// </summary>
        [SugarColumn(ColumnDescription = "设备类型所属产品线: 0-辅助设备,1-主设备")]
        public int ProductLine
        {
            get { return _ProductLine; }
            set { _ProductLine = value; OnPropertyChanged(nameof(ProductLine)); }
        }
        private string _Remark;
        /// <summary>
        /// 备注
        /// </summary>
        [SugarColumn(IsNullable = true, Length = 128, ColumnDescription = "备注")]
        public string Remark
        {
            get { return _Remark; }
            set { _Remark = value; OnPropertyChanged(nameof(Remark)); }
        }

    }
}